package cn.js.sangu.unitStore.service.update;

import cn.js.sangu.unitStore.entity.BomEntity;
import cn.js.sangu.unitStore.common.exception.ServiceException;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.js.sangu.unitStore.mapper.BomMapper;

/**
 * 说明：抽取公共方法，用于更新BomEntity
 * 作者：linshuo
 */
@Service
public class BomUpdateService extends ServiceImpl<BomMapper, BomEntity> {

    public boolean updateBomEntity(BomEntity utilsEntity) {
        try {
            return super.updateById(utilsEntity);
        } catch (Exception e) {
            throw new ServiceException("Bom记录更新失败！请联系管理员");
        }
    }
}